//
//  GameManagedObject.h
//  prototype
//
//  Created by OS X on 11-12-18.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>

@class PlayerManagedObject;

@interface GameManagedObject: NSManagedObject

+ (GameManagedObject *)gameWithResult:(NSDictionary *)result inManagedContext:(NSManagedObjectContext *)context;

@property (nonatomic, retain) NSDate *date;
@property (nonatomic, retain) NSData *replay;
@property (nonatomic, retain) NSNumber *draw;
@property (nonatomic, retain) NSNumber *pvp;
@property (nonatomic, retain) NSString *player1;
@property (nonatomic, retain) NSString *player2;
@property (nonatomic, retain) NSNumber *moves;
@property (nonatomic, retain) NSOrderedSet *players;
@end

@interface GameManagedObject (CoreDataGeneratedAccessors)

- (void)insertObject:(PlayerManagedObject *)value inPlayersAtIndex:(NSUInteger)idx;
- (void)removeObjectFromPlayersAtIndex:(NSUInteger)idx;
- (void)insertPlayers:(NSArray *)value atIndexes:(NSIndexSet *)indexes;
- (void)removePlayersAtIndexes:(NSIndexSet *)indexes;
- (void)replaceObjectInPlayersAtIndex:(NSUInteger)idx withObject:(PlayerManagedObject *)value;
- (void)replacePlayersAtIndexes:(NSIndexSet *)indexes withPlayers:(NSArray *)values;
- (void)addPlayersObject:(PlayerManagedObject *)value;
- (void)removePlayersObject:(PlayerManagedObject *)value;
- (void)addPlayers:(NSOrderedSet *)values;
- (void)removePlayers:(NSOrderedSet *)values;

@end
